using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using DTO;
using System.Data;

namespace HeThongDAO
{
    public class ThamSoDAO
    {
        public static DataTable SelectAll()
        {
            string sql = "SELECT * FROM THAM_SO";
            return Config.AccessHelper.ExecuteQuery(sql);
        }

        public static System.Data.DataTable DocSchema(string strQuery)
        {
            return Config.AccessHelper.Doc_Cau_Truc_HungPham(strQuery);
        }

        public static bool Update(DataTable dt)
        {
            try
            {
                Config.AccessHelper.Ghi(dt, "THAM_SO");
                return true;
            }
            catch
            {
                return false;
            }
        }
        // Xuan huy 
        public static DataTable LayQuiDinh(int maQD)
        {
            string sql = "SELECT * FROM THAM_SO WHERE MaQuyDinh = " + maQD.ToString();
            return Config.AccessHelper.ExecuteQuery(sql);
        }
    }
}
